home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Georgia Wildfire Prevention
/
Georgia Wildfire Prevention.iso
/
pc
/
media
/
dirs
/
BackUp
/
code.cst
/
00037_Script_blink
< prev
Wrap
Text File
|
2002-10-15
|
1KB
|
58 lines
property plain,blink1,blink2,state,flashstate,flashon,nextflash,blinkrate,mysprite,spritenum
global ans,lastclicked,nome,godject
on new me
mysprite=sprite(spritenum)
plain=mysprite.member.name
state=0
flashstate=0
flashon=0
nextflash=0
blinkrate=30
end
on beginsprite me
if blink1="x" then blink1=plain
if blink2="x" then blink2=plain&"hot"
end
on getpropertydescriptionlist me
set proplist=[#blink1:[#comment:"Name of blink image",#format:#string,#default:"x"],#blink2:[#comment:"Name of other image",#format:#string,#default:"x"]]
return proplist
end
on flash me
if flashstate=0 then
mysprite.member=member(blink2)
else
mysprite.member=member(blink1)
end if
flashstate=not(flashstate)
end
on blink_on me,br
if br.ilk=#integer then blinkrate=br
nextflash=the ticks+blinkrate
flashon=1
end
on blink_off me
mysprite.member=member(blink1)
updatestage
flashon=0
end
on exitframe me
if flashon then
if the ticks>nextflash then
flash(me)
nextflash=the ticks+blinkrate
end if
end if
end